<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * BeControllerApplicationPlanet
 */
class BeControllerApplicationPlanet extends BeController {
	public function colonize() {
		$application	= &JFactory::getApplication();
		$table				= &JTable::getInstance('ApplicationColony', 'BeTable');

		$table
			->setPlanet($application->input->getInt('id'))
			->setPlayer($application->getUserState('application.player.id'));

		if($table->store() === true) {
			$this->setRedirect(BeRouteHelper::_('view=applicationplanet&id=' . $application->input->getInt('id')));
			$this->redirect();
		}
	}
}
?>